#include "process_bar.h"
void ForTest()
{
    printf("this is a test\n");
    printf("this is a test\n");
    printf("this is a test\n");
    printf("this is a test\n");
    printf("this is a test\n");

}

const char* lable = "|/-\\";
//version 1
void process_bar()
{
    char buff[length] = { 0 }; 
    for (int i = 0; i < length; ++i)
    {
        printf("[%-100s][%d%%][%c]\r", buff, i, lable[i%4]);
        fflush(stdout);
        buff[i] = sign;
        usleep(100000);
    }
    buff[length - 1] = '\0';
    printf("\n");
}
